import http from '@/utils/http'

//登录
export function login(data) {
    return http.post('/lzh/user/login', data)
}

//注册
export function finishRegister(data) {
    return http.post('/lzh/user/finishRegister', data)
}

//发送注册验证码 - 邮件
export function sendEmailRegisterCode(data) {
    return http.post('/lzh/user/sendEmailRegisterCode', data)
}

//退出登录
export function logout() {
    return http.post('/lzh/user/logout')
}

//获取用户信息
export function getUserInfo() {
    return http.get('/lzh/user/get/login')
}

//获取用户信息
export function updatePassword(data) {
    return http.put('/lzh/user/updatePassword', data)
}

//更新用户信息
export function updateUserInfo(data) {
    return http.put('/lzh/user/updateUserInfo', data)
}

//分页查询
export function findUserPage(data) {
    return http.post('/lzh/user/pageList', data)
}

//删除用户
export function deleteUser(data) {
    return http.post(`/lzh/user/delete/${data}`)
}

//更新用户头像
export function updateAvatar(data) {
    return http.post(`/lzh/user/updateAvatar`, data)
}